home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 5
/
Merciful - Disc 5.iso
/
software
/
p
/
pcqpascalv1.2d.lha
/
Include
/
Intuition
/
GadgetClass.i
< prev
next >
Wrap
Text File
|
1997-05-06
|
11KB
|
316 lines
{ GadgetClass.i }
{$I "Include:Exec/Types.i"}
{$I "Include:Intuition/Intuition.i"}
{$I "Include:Utility/TagItem.i"}
{
* NOTE: <intuition/iobsolete.h> is included at the END of this file!
}
{ Gadget Class attributes }
CONST
GA_Dummy = (TAG_USER +$30000);
GA_Left = (GA_Dummy + $0001);
GA_RelRight = (GA_Dummy + $0002);
GA_Top = (GA_Dummy + $0003);
GA_RelBottom = (GA_Dummy + $0004);
GA_Width = (GA_Dummy + $0005);
GA_RelWidth = (GA_Dummy + $0006);
GA_Height = (GA_Dummy + $0007);
GA_RelHeight = (GA_Dummy + $0008);
GA_Text = (GA_Dummy + $0009); { ti_Data is (UBYTE *) }
GA_Image = (GA_Dummy + $000A);
GA_Border = (GA_Dummy + $000B);
GA_SelectRender = (GA_Dummy + $000C);
GA_Highlight = (GA_Dummy + $000D);
GA_Disabled = (GA_Dummy + $000E);
GA_GZZGadget = (GA_Dummy + $000F);
GA_ID = (GA_Dummy + $0010);
GA_UserData = (GA_Dummy + $0011);
GA_SpecialInfo = (GA_Dummy + $0012);
GA_Selected = (GA_Dummy + $0013);
GA_EndGadget = (GA_Dummy + $0014);
GA_Immediate = (GA_Dummy + $0015);
GA_RelVerify = (GA_Dummy + $0016);
GA_FollowMouse = (GA_Dummy + $0017);
GA_RightBorder = (GA_Dummy + $0018);
GA_LeftBorder = (GA_Dummy + $0019);
GA_TopBorder = (GA_Dummy + $001A);
GA_BottomBorder = (GA_Dummy + $001B);
GA_ToggleSelect = (GA_Dummy + $001C);
{ internal use only, until further notice, please }
GA_SysGadget = (GA_Dummy + $001D);
{ bool, sets GTYP_SYSGADGET field in type }
GA_SysGType = (GA_Dummy + $001E);
{ e.g., GTYP_WUPFRONT, ... }
GA_Previous = (GA_Dummy + $001F);
{ previous gadget (or (struct Gadget **)) in linked list
* NOTE: This attribute CANNOT be used to link new gadgets
* into the gadget list of an open window or requester.
* You must use AddGList().
}
GA_Next = (GA_Dummy + $0020);
{ not implemented }
GA_DrawInfo = (GA_Dummy + $0021);
{ some fancy gadgets need to see a DrawInfo
* when created or for layout
}
{ You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage }
GA_IntuiText = (GA_Dummy + $0022);
{ ti_Data is (struct IntuiText *) }
GA_LabelImage = (GA_Dummy + $0023);
{ ti_Data is an image (object), used in place of
* GadgetText
}
GA_TabCycle = (GA_Dummy + $0024);
{ New for V37:
* Boolean indicates that this gadget is to participate in
* cycling activation with Tab or Shift-Tab.
}
GA_GadgetHelp = (GA_Dummy + $0025);
{ New for V39:
* Boolean indicates that this gadget sends gadget-help
}
GA_Bounds = (GA_Dummy + $0026);
{ New for V39:
* ti_Data is a pointer to an IBox structure which is
* to be copied into the extended gadget's bounds.
}
GA_RelSpecial = (GA_Dummy + $0027);
{ New for V39:
* Boolean indicates that this gadget has the "special relativity"
* property, which is useful for certain fancy relativity
* operations through the GM_LAYOUT method.
}
{ PROPGCLASS attributes }
PGA_Dummy = (TAG_USER + $31000);
PGA_Freedom = (PGA_Dummy + $0001);
{ only one of FREEVERT or FREEHORIZ }
PGA_Borderless = (PGA_Dummy + $0002);
PGA_HorizPot = (PGA_Dummy + $0003);
PGA_HorizBody = (PGA_Dummy + $0004);
PGA_VertPot = (PGA_Dummy + $0005);
PGA_VertBody = (PGA_Dummy + $0006);
PGA_Total = (PGA_Dummy + $0007);
PGA_Visible = (PGA_Dummy + $0008);
PGA_Top = (PGA_Dummy + $0009);
{ New for V37: }
PGA_NewLook = (PGA_Dummy + $000A);
{ STRGCLASS attributes }
STRINGA_Dummy = (TAG_USER +$32000);
STRINGA_MaxChars = (STRINGA_Dummy + $0001);
STRINGA_Buffer = (STRINGA_Dummy + $0002);
STRINGA_UndoBuffer = (STRINGA_Dummy + $0003);
STRINGA_WorkBuffer = (STRINGA_Dummy + $0004);
STRINGA_BufferPos = (STRINGA_Dummy + $0005);
STRINGA_DispPos = (STRINGA_Dummy + $0006);
STRINGA_AltKeyMap = (STRINGA_Dummy + $0007);
STRINGA_Font = (STRINGA_Dummy + $0008);
STRINGA_Pens = (STRINGA_Dummy + $0009);
STRINGA_ActivePens = (STRINGA_Dummy + $000A);
STRINGA_EditHook = (STRINGA_Dummy + $000B);
STRINGA_EditModes = (STRINGA_Dummy + $000C);
{ booleans }
STRINGA_ReplaceMode = (STRINGA_Dummy + $000D);
STRINGA_FixedFieldMode = (STRINGA_Dummy + $000E);
STRINGA_NoFilterMode = (STRINGA_Dummy + $000F);
STRINGA_Justification = (STRINGA_Dummy + $0010);
{ GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT }
STRINGA_LongVal = (STRINGA_Dummy + $0011);
STRINGA_TextVal = (STRINGA_Dummy + $0012);
STRINGA_ExitHelp = (STRINGA_Dummy + $0013);
{ STRINGA_ExitHelp is new for V37, and ignored by V36.
* Set this if you want the gadget to exit when Help is
* pressed. Look for a code of $5F, the rawkey code for Help
}
SG_DEFAULTMAXCHARS = (128);
{ Gadget Layout related attributes }
LAYOUTA_Dummy = (TAG_USER + $38000);
LAYOUTA_LayoutObj = (LAYOUTA_Dummy + $0001);
LAYOUTA_Spacing = (LAYOUTA_Dummy + $0002);
LAYOUTA_Orientation = (LAYOUTA_Dummy + $0003);
{ orientation values }
LORIENT_NONE = 0;
LORIENT_HORIZ = 1;
LORIENT_VERT = 2;
{ Gadget Method ID's }
GM_Dummy = (-1); { not used for anything }
GM_HITTEST = (0); { return GMR_GADGETHIT IF you are clicked on
* (whether or not you are disabled).
}
GM_RENDER = (1); { draw yourself, in the appropriate state }
GM_GOACTIVE = (2); { you are now going to be fed input }
GM_HANDLEINPUT = (3); { handle that input }
GM_GOINACTIVE = (4); { whether or not by choice, you are done }
GM_HELPTEST = (5); { Will you send gadget help if the mouse is
* at the specified coordinates? See below
* for possible GMR_ values.
}
GM_LAYOUT = (6); { re-evaluate your size based on the GadgetInfo
* Domain. Do NOT re-render yourself yet, you
* will be called when it is time...
}
{ Parameter "Messages" passed to gadget class methods }
{ GM_HITTEST }
type
gpht_Mouse_Struct = Record
x,y : Short;
END;
gpHitTest = Record
MethodID : Integer;
gpht_GInfo : GadgetInfoPtr;
gpht_Mouse : gpht_Mouse_Struct;
END;
gpHitTestPtr = ^gpHitTest;
const
{ For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit,
* otherwise return zero.
*
* For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit.
* Typically, return GMR_HELPHIT if you were hit.
* It is possible to pass a UWORD to the application via the Code field
* of the IDCMP_GADGETHELP message. Return GMR_HELPCODE or'd with
* the UWORD-sized result you wish to return.
*
* GMR_HELPHIT yields a Code value of ((UWORD) ~0), which should
* mean "nothing particular" to the application.
}
GMR_GADGETHIT = ($00000004); { GM_HITTEST hit }
GMR_NOHELPHIT = ($00000000); { GM_HELPTEST didn't hit }
GMR_HELPHIT = ($FFFFFFFF); { GM_HELPTEST hit, return code = ~0 }
GMR_HELPCODE = ($00010000); { GM_HELPTEST hit, return low word as code }
{ GM_RENDER }
Type
gpRender = Record
MethodID : Integer;
gpr_GInfo : GadgetInfoPtr; { gadget context }
gpr_RPort : RastPortPtr; { all ready for use }
gpr_Redraw : Integer; { might be a "highlight pass" }
END;
gpRenderPtr = ^gpRender;
{ values of gpr_Redraw }
CONST
GREDRAW_UPDATE = (2); { incremental update, e.g. prop slider }
GREDRAW_REDRAW = (1); { redraw gadget }
GREDRAW_TOGGLE = (0); { toggle highlight, IF applicable }
{ GM_GOACTIVE, GM_HANDLEINPUT }
Type
gpi_Mouse_Struct = Record
x,y : Short;
END;
gpInput = Record
MethodID : Integer;
gpi_GInfo : GadgetInfoPtr;
gpi_IEvent : InputEventPtr;
gpi_Termination : Address;
gpi_Mouse : gpi_Mouse_Struct;
{* (V39) Pointer to TabletData structure, if this event originated
* from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if
* not.
*
* DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
* IT WILL BE INVALID!
*}
gpi_TabletData : TabletDataPtr;
END;
gpInputPtr = ^gpInput;
{ GM_HANDLEINPUT and GM_GOACTIVE return code flags }
{ return GMR_MEACTIVE (0) alone if you want more input.
* Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
* GMR_VERIFY.
}
CONST
GMR_MEACTIVE = (0);
GMR_NOREUSE = (2);
GMR_REUSE = (4);
GMR_VERIFY = (8); { you MUST set cgp_Termination }
{ New for V37:
* You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
* which instructs Intuition to activate the next or previous gadget
* that has GFLG_TABCYCLE set.
}
GMR_NEXTACTIVE = (16);
GMR_PREVACTIVE = (32);
{ GM_GOINACTIVE }
Type
gpGoInactive = Record
MethodID : Integer;
gpgi_GInfo : GadgetInfoPtr;
{ V37 field only! DO NOT attempt to read under V36! }
gpgi_Abort : Integer; { gpgi_Abort=1 IF gadget was aborted
* by Intuition and 0 if gadget went
* inactive at its own request
}
END;
gpGoInactivePtr = ^gpGoInactive;
{* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when
* the gadget is added to the window (or when the window opens, if
* the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
* list), or when the window is resized. Your gadget can set the
* GA_RelSpecial property to get GM_LAYOUT events without Intuition
* changing the interpretation of your gadget select box. This
* allows for completely arbitrary resizing/repositioning based on
* window size.
*}
{* GM_LAYOUT *}
Type
gpLayout = Record
MethodID : Integer;
gpl_GInfo : GadgetInfoPtr;
gpl_Initial : Integer; {* non-zero if this method was invoked
* during AddGList() or OpenWindow()
* time. zero if this method was invoked
* during window resizing.
*}
end;
gpLayoutPtr = ^gpLayout;
{$I "Include:intuition/iobsolete.i"};